package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.StrategyCollect;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface StrategyCollectMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(StrategyCollect record);

    StrategyCollect selectByPrimaryKey(Integer id);

    List<StrategyCollect> selectAll();

    int updateByPrimaryKey(StrategyCollect record);

    StrategyCollect getCollectByUserId(@Param("userId") Long userId, @Param("strategyId") Long strategyId, @Param("state") Long state);

    StrategyCollect selectExist(@Param("userId") Long userId, @Param("strategyId") Long strategyId);

    void insertCollect(StrategyCollect entity);

    void changeState(@Param("userId") Long userId, @Param("strategyId") Long strategyId, @Param("time") Date time, @Param("state") boolean state);

    Integer getCollectNumsByStrategyId(Long strategyId);

    List<StrategyCollect> query(@Param("qo") QueryObject qo, @Param("userId") Long userId);
}